<template>
  <view class="topics">
    <topic v-for="topic in topics" :topic="topic" :key="topic.id"></topic>
  </view>
</template>

<script>
import { STUDY_HISTORY } from "../../utils";
export default {
  name: "history",
  data() {
    return {
      topics: [],
    };
  },
  async onShow() {
    let studyHistory = uni.getStorageSync(STUDY_HISTORY) || [];
    this.topics = studyHistory;
  },
};
</script>

<style lang="scss"></style>
